<!DOCTYPE html>
<html xmlns:th="www.thymeleaf.org">
<head th:replace="admin::head"></head>
<title>新增动漫 - 管理员中心 - 双辞动漫-专注二次元动漫的小站</title>
<meta name="keywords" content="新增动漫 - 管理员中心">
<meta name="description" content="新增动漫 - 管理员中心">
<link rel="stylesheet" type="text/css" href="css/admin_info.css">
<script type="text/javascript" src="/template/conch/asset/js/set/formValidator.js"></script>
<script type="text/javascript" src="/static/js/jquery.imageupload.js"></script>
<script type="text/javascript">
    var maccms={"path":"","mid":"6","url":"www.scdmfun.cn","wapurl":"www.cdmfun.cn","mob_status":"0"};
    var conchtpl={"surl":"/search.html","tipt":"网站公告","tipc":"这里是双辞动漫新站<br><span class='hl-text-conch'>注意事项：</span>1.老站新老站账号不通用<br>老站网址：<span class='hl-text-conch'>dm.scdmfun.cn</span><br>2.如果登录后还是提示未登录请稍等一会再刷新即可<br>动漫闲聊群：<span class='hl-text-conch'>542266218</span>","slink":"https://www.scdmfun.cn/","short":"","api":"0","tok":"","term":"long-term","ver":"3.1"}
</script>
<body id="conch-member">
<!--海螺影视主题  https://www.360mb.net/23977.html-->
<div th:replace="admin::.conch-header"></div>
<div class="conch-header">
    <div class="conch-headwrap conch-hasone conch-hasconch hl-hide-sm">
        <div class="hl-mob-nav">
            <a href="javascript:MAC.GoBack()" class="hl-pull-left left"><i class="iconfont hl-icon-jiantouzuo"></i></a>
            <a href="javascript:void(0)" class="hl-pull-right right"></a>
            <span class="hl-mob-title hl-text-site hl-lc-1">新增动漫</span>
        </div>
    </div>
</div>
<div class="conch-content conch-member">
    <div class="conch-ctwrap">
        <div class="hl-ctwrap-item">
            <div class="container">
                <div class="hl-row-box clearfix">
                    <div class="row">
                        <div th:replace="admin::#left"></div>
                        <div id="right" class="hl-right-content hl-col-xs-12 hl-col-sm-70w hl-col-lg-9">
                            <div class="hl-cont-right">
                                <div class="hl-rb-head hl-hidden-xs clearfix">
                                    <h2 class="hl-rb-title">新增动漫</h2>
                                </div>
                                <div class="hl-cont-tab">
                                    <div class="hl-cont-list" id="app">
                                        <div class="hl-list-wrap">
                                            <form id="fm" name="fm" method="post" action="">
                                                <p><span>动漫名</span><input type="text" name="cname" v-model="cname"
                                                                         placeholder="请输入动漫名"></p>
                                                <p><span>动漫别名</span><input type="text" name="alias" v-model="alias"
                                                                          placeholder="请输入动漫别名"></p>
                                                <p><span>更新状态</span><input type="text" name="cstate" v-model="cstate"
                                                                          placeholder="请输入更新状态"></p>
                                                <p><span>分类</span><input type="text" name="classname" v-model="classname"
                                                                          placeholder="请输入分类"></p>
                                                <p><span>版本</span><input type="text" name="edition" v-model="edition"
                                                                         placeholder="请输入版本"></p>
                                                <p><span>主演</span><input type="text" name="protagonist" v-model="protagonist"
                                                                          placeholder="请输入主演"></p>
                                                <p><span>导演</span><input type="text" name="director" v-model="director"
                                                                          placeholder="请输入导演"></p>
                                                <p><span>上映年份</span><input type="text" name="showYear" v-model="showYear"
                                                                           placeholder="请输入上映年份"></p>
                                                <p><span>上映时间</span><input type="text" name="showTime" v-model="showTime"
                                                                           placeholder="请输入上映时间"></p>
                                                <p><span>上映地区</span><input type="text" name="showArea" v-model="showArea"
                                                                         placeholder="请输入上映地区"></p>
                                                <p><span>时长</span><input type="text" name="chour" v-model="chour"
                                                                           placeholder="请输入时长" oninput = "value=value.replace(/[^\d]/g,'')"></p>
                                                <p><span>最近更新</span><input type="text" name="lastDate" v-model="lastDate"
                                                                           placeholder="请输入最近更新时间"></p>
                                                <p><span>动漫简介</span><input type="text" name="synopsis" v-model="synopsis"
                                                                           placeholder="请输入动漫简介"></p>
                                                <p><span>封面</span><input type="text" name="cimage" v-model="cimage"
                                                                           placeholder="请输入封面"></p>
                                                <p><span>类型</span><input type="text" name="ctype" v-model="ctype"
                                                                           placeholder="请输入类型"></p>
                                                <p><span>语言</span><input type="text" name="clanguage" v-model="clanguage" value="日语"
                                                                           placeholder="请输入语言"></p>
                                                <p><span>评分</span><input type="text" name="cscore" v-model="cscore"
                                                                         placeholder="请输入评分"></p>
                                                <p><span>评论次数</span><input type="text" name="commentnum" v-model="commentnum"
                                                                         placeholder="请输入评论次数" oninput = "value=value.replace(/[^\d]/g,'')"></p>
                                                <button type="button" id="btn_submit" class="hl-btn-submit hl-bg-conch" @click="commit()">保存</button>
                                            </form>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!--海螺影视主题  https://www.360mb.net/23977.html-->
<div th:replace="admin::.conch-footer"></div>
<script src="https://lib.baomitu.com/vue/2.6.14/vue.min.js"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/axios/0.26.0/axios.min.js"></script>
<script type="text/javascript">
    let a=new Vue({
        el: "#app",
        data: {
            cname: '',
            alias: '',
            cstate: '',
            protagonist: '',
            classname: '全部',
            director: '',
            showYear: '',
            showTime: '',
            showArea: '日本',
            chour: '',
            lastDate: '',
            synopsis: '',
            cimage: '',
            ctype: '',
            clanguage: '日语',
            cscore: '',
            commentnum: '',
            edition: '全部'
        },
        methods: {
            commit(){
                var url="/addCartoon.do";
                var _this=this;
                if (_this.cname==''){
                    alert("动漫名不能为空");
                    return;
                }
                if (_this.classname==''){
                    alert("分类不能为空");
                    return;
                }
                if (_this.ctype==''){
                    alert("类型不能为空");
                    return;
                }
                if (_this.edition==''){
                    alert("版本不能为空");
                    return;
                }
                var param=new URLSearchParams();
                param.append("cname",_this.cname);
                param.append("alias",_this.alias);
                param.append("cstate",_this.cstate);
                param.append("classname",_this.classname);
                param.append("protagonist",_this.protagonist);
                param.append("director",_this.director);
                param.append("showYear",_this.showYear);
                param.append("showTime",_this.showTime);
                param.append("showArea",_this.showArea);
                param.append("chour",_this.chour);
                param.append("edition",_this.edition);
                param.append("lastDate",_this.lastDate);
                param.append("synopsis",_this.synopsis);
                param.append("cimage",_this.cimage);
                param.append("ctype",_this.ctype);
                param.append("clanguage",_this.clanguage);
                param.append("cscore",_this.cscore);
                param.append("commentnum",_this.commentnum);
                axios.post(url, param).then(res=>{
                    var data=res.data;
                    alert(res.data.msg);
                });
            }
        }
    })
</script>
</body>
</html>